﻿using DA.Core;
using DA.DataBase;
using DA.HMI.ViewModels;
using DA.HMI.Views;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Unity;
using System.Windows;

namespace DA.HMI
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        protected override Window CreateShell()
        {
            return Container.Resolve<MainView>();
        }
        protected override void OnInitialized()
        {
            base.OnInitialized();
        }
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterDialog<LoginView, LoginViewModel>();
            containerRegistry.RegisterForNavigation<ProcessStateView, ProcessStateViewModel>();
            containerRegistry.RegisterForNavigation<LogView, LogViewModel>();
        }
        
        protected override void ConfigureModuleCatalog(IModuleCatalog moduleCatalog)
        {
            moduleCatalog.AddModule<CoreModule>();
            //moduleCatalog.AddModule<DBModule>();
            base.ConfigureModuleCatalog(moduleCatalog);
        }
    }
}
